<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MakananController extends CI_Controller {

  
	public function tambah_makanan(){
	$data = array( 
		'nama' => $this->input->post('nama'),
		'bahan' => $this->input->post('bahan'),
		'cara' => $this->input->post('cara'),
	);
	$this->load->model('makanan');
	$this->makanan->addMinuman($data);
	$this->data['makanan'] = $this->makanan->get_minuman();
		$this->data['page'] = 'makanan';
		$this->data['title'] = 'Daftar Minuman';
		$this->load->view('dashboard', $this->data);
	}

	public function edit($id){
	$this->load->model('makanan');
		$this->data['makanan'] = $this->makanan->EditMakanan($id);
		$this->data['page'] = 'EditMakanan';
		$this->data['title'] = 'Edit Minuman';
		$this->load->view('dashboard', $this->data);

	}
	public function delete($id){
		
	}
  }